//用户信息共享状态库
import { defineStore } from 'pinia';
export const useUserStore = defineStore('user', {
    state: () => ({
        userInfor: {
            id: '',
            ctime: '',
            account: '',
            userGroup:'',
            imgUrl: ''
        },
        userFlag:false
    }),
    actions: {
        setInfor(userInfor) {
            this.userInfor = { ...userInfor }
        },
        changeFlag(){
            this.userFlag=!this.userFlag;
        }
    },
    persist: {
        enabled: true,
    }
})